function argmax = x_dot_max(dV_x_over_dx)
global delta
global gamma_x
global gamma_s
global alpha
global c_x_1
global c_x_2
global x
global s
global x_dot_bar

state_dependent_term = max(gamma_x-x,0)-max(gamma_s-s,0);

argmax = min(max(0,((dV_x_over_dx-state_dependent_term-c_x_1)/(c_x_2*alpha))).^(1/(alpha-1))-delta,x_dot_bar);

end

